<form id="add-form" class="form-horizontal" method="POST" action="{:url('save')}">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">板块名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="name" value="{$data['name']|default=''}" class="form-control"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">父板块:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control" name="parent">
                <option value="">请选择</option>
                {volist name="parents" id="vo"}
                  <option value="{$vo.id}" {if condition="(!empty($data)) AND $vo['id'] eq $data['parent']"}selected{/if}>{$vo.name}</option>
                  {volist name="vo['son']" id="son"}
                   <option value="{$son.id}" {if condition="(!empty($data)) AND $son['id'] eq $data['parent']"}selected{/if}>---{$son.name}</option>
                  {/volist}
                {/volist}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">板块描述:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea type="text" name="des" class="form-control">{$data['des']|default=''}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" name="id" value="{$data['id']|default=''}" class="form-control"/>
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>